#ifndef ILI9XX_H
#define ILI9XX_H

#include <stdint.h>
#include "eport_drv.h"
#include "lcd_interface.h"


#define LCD_BL(x) 	x ?(DRV_EPORT_WritePinsLevel(EPORT7, EPORT_PIN59, GPIO_HIGH)) : (DRV_EPORT_WritePinsLevel(EPORT7, EPORT_PIN59, GPIO_LOW))

uint16_t LCD_BGR2RGB(uint16_t bgr);
void LCD_ILI_Display_On(void);
void LCD_ILI_Display_Off(void);
void LCD_ILI_Set_Cursor(uint16_t Xpos, uint16_t Ypos);
void LCD_ILI_Set_Window(uint16_t sx, uint16_t sy, uint16_t width, uint16_t height);
void LCD_ILI_Draw_Point(uint16_t x, uint16_t y, uint16_t *color);
void LCD_ILI_Clear_Color(uint16_t color);
void LCD_ILI_Fill_Color(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t color);
void LCD_ILI_Color_Fill(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, uint16_t *color);
void LCD_ILI_Draw_Line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t *color);
void LCD_ILI_Draw_Rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t *color);
void LCD_ILI_Draw_Circle(uint16_t x0, uint16_t y0, uint16_t r, uint16_t *color);
void LCD_ILI_Show_Num(uint16_t x, uint16_t y, uint32_t num, uint8_t len, uint8_t size, uint16_t color);
void LCD_ILI_Show_n_Num(uint16_t x, uint16_t y, uint32_t num, uint8_t len, uint8_t size, uint8_t mode);
void LCD_ILI_Show_String(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t size, uint8_t *p);
LCD_Status LCD_ILI_Init(LCD_DriverIC ic);




#endif
